<div ng-controller="DashBoradCtrl">
    <div class="hbox hbox-auto-xs hbox-auto-sm" ng-show="!flag">
        <!--     main -->
        <div>
            <!--         main header -->
            <div class="m-b-lg wrapper-md">
                <div class="row m-b-xxl m-t-xxl">
                    <div class="col-md-6">
                        <div class="padder m-b-xxl">
                            <h1 class="text-center text-success">
                                <i class="fa fa-car"></i> 登录成功！
                            </h1>
                        </div>
                        <div class="w-xxl w-auto-xs center-block wrapper"
                             style="background: rgba(184, 208, 224, 0.41);">
                            <a> <img src="img/logo/logo_sky.png" alt="logo"
                                     class="center-block img-responsive wrapper"
                                     style="filter: drop-shadow(0px 2px 1px rgba(0, 0, 0, 0.7));">
                            </a>

                            <div class="">
                                <p>
                                    <span class="inline text-right w-xs">名称：</span> <span
                                        class="text-info">{{loginUser.name}}</span>
                                </p>

                                <p>
                                    <span class="inline text-right w-xs">用户名：</span> <span
                                        class="text-info">{{loginUser.username}}</span>
                                </p>

                                <p>
                                    <span class="inline text-right w-xs">电话号码：</span> <span
                                        class="text-info">{{loginUser.phone}}</span>
                                </p>
                            </div>
                            <hr style="border-color: rgba(0, 0, 0, 0.06);">
                            <div class="text-center">
                                <p>
                                    <a class="btn btn-info btn-block" ng-click="logout()">退出登录</a>
                                </p>
                            </div>
                        </div>
                    </div>
                    <div
                            class="col-md-6 hidde
                n-sm hidden-xs animated fadeInRightBig">
                        <img src="img/login/welcome_bg.jpg" style="margin-top: 150px;">
                    </div>
                </div>
            </div>

        </div>
    </div>

    <div ng-show="flag">
        <div class="bg-light lter b-b b-t wrapper-md">
            <h1 class="m-n font-thin h3 text-black">数据报表</h1>
            <small class="text-muted">所有数据每小时统计一次 默认显示当天到次日0点结束的数据</small>
        </div>
        <div>
            <toaster-container
                    toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>

            <div class="panel-body">
                <div class="tab-content"
                     ng-init="stats={order:true,passenger:false,sms:false,booking:false,bus:false}">
                    <ul class="nav nav-tabs">
                        <li ng-class="{active:stats.order}"><a href role="tab"
                                                               data-toggle="tab"
                                                               ng-click="stats.order=true;stats.passenger=false;stats.sms=false;stats.booking=false;stats.bus=false">订单数据统计</a>
                        </li>
                        <li ng-class="{active:stats.passenger}"><a href role="tab"
                                                                   data-toggle="tab"
                                                                   ng-click="stats.order=false;stats.passenger=true;stats.sms=false;stats.booking=false;stats.bus=false">乘客用户数量统计</a>
                        </li>
                        <li ng-class="{active:stats.sms}"><a href role="tab"
                                                             data-toggle="tab"
                                                             ng-click="stats.order=false;stats.passenger=false;stats.sms=true;stats.booking=false;stats.bus=false">短信发送次数统计</a>
                        </li>
                        <li ng-class="{active:stats.booking}"><a href role="tab"
                                                                 data-toggle="tab"
                                                                 ng-click="stats.order=false;stats.passenger=false;stats.sms=false;stats.booking=true;stats.bus=false">订票售票数统计</a>
                        </li>
                        <li ng-class="{active:stats.bus}"><a href role="tab"
                                                             data-toggle="tab"
                                                             ng-click="stats.order=false;stats.passenger=false;stats.sms=false;stats.booking=false;stats.bus=true">跨城巴士售票数统计</a>
                        </li>
                    </ul>
                </div>
            </div>

            <div class="wrapper-md tab-pane active" ng-controller="OrderCountCtrl"
                 has-role="ADMIN" ng-if="stats.order" echarts>
                <div class="row">
                    <form class="bs-example form-horizontal ng-pristine ng-valid">
                        <div class="form-group col-md-3"
                             ng-controller="DatepickerDemoCtrl">
                            <div class="col-md-11">
                                <div class="input-group">
                                    <input type="text" class="form-control"
                                           datepicker-popup="{{selected_format}}" is-open="opened"
                                           ng-model="timeRange.startTime"
                                           ng-init="selected_format=formats[5]"
                                           datepicker-options="dateOptions" close-text="Close"
                                           placeholder="起始时间" readOnly/> <span class="input-group-btn">
										<button type="button" class="btn btn-default"
                                                ng-click="open($event)">
                                            <i class="glyphicon glyphicon-calendar"></i>
                                        </button>
									</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-md-3"
                             ng-controller="DatepickerDemoCtrl">
                            <div class="col-md-11">
                                <div class="input-group">
                                    <input type="text" class="form-control"
                                           datepicker-popup="{{selected_format}}" is-open="opened"
                                           ng-model="timeRange.endTime"
                                           ng-init="selected_format=formats[5]"
                                           datepicker-options="dateOptions" close-text="Close"
                                           placeholder="结束时间" readOnly/> <span class="input-group-btn">
										<button type="button" class="btn btn-default"
                                                ng-click="open($event)">
                                            <i class="glyphicon glyphicon-calendar"></i>
                                        </button>
									</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-md-3">
                            <div class="col-md-11">
                                <button type="button" class="btn btn-info" ng-click="query()">查询</button>
                            </div>
                        </div>
                    </form>
                    <div class="panel-body">
                        <div id="orderCount" style="height: 500px; width: 1200px"></div>
                    </div>

                </div>
            </div>

            <div class="wrapper-md tab-pane active" ng-controller="PassengerCountCtrl"
                 has-role="ADMIN" ng-if="stats.passenger" echarts>
                <div class="row">
                    <form class="bs-example form-horizontal ng-pristine ng-valid">
                        <div class="form-group col-md-3"
                             ng-controller="DatepickerDemoCtrl">
                            <div class="col-md-11">
                                <div class="input-group">
                                    <input type="text" class="form-control"
                                           datepicker-popup="{{selected_format}}" is-open="opened"
                                           ng-model="timeRange.startTime"
                                           ng-init="selected_format=formats[5]"
                                           datepicker-options="dateOptions" close-text="Close"
                                           placeholder="起始时间" readOnly/> <span class="input-group-btn">
										<button type="button" class="btn btn-default"
                                                ng-click="open($event)">
                                            <i class="glyphicon glyphicon-calendar"></i>
                                        </button>
									</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-md-3"
                             ng-controller="DatepickerDemoCtrl">
                            <div class="col-md-11">
                                <div class="input-group">
                                    <input type="text" class="form-control"
                                           datepicker-popup="{{selected_format}}" is-open="opened"
                                           ng-model="timeRange.endTime"
                                           ng-init="selected_format=formats[5]"
                                           datepicker-options="dateOptions" close-text="Close"
                                           placeholder="结束时间" readOnly/> <span class="input-group-btn">
										<button type="button" class="btn btn-default"
                                                ng-click="open($event)">
                                            <i class="glyphicon glyphicon-calendar"></i>
                                        </button>
									</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-md-3">
                            <div class="col-md-11">
                                <button type="button" class="btn btn-info" ng-click="query()">查询</button>
                            </div>
                        </div>
                    </form>
                    <div class="panel-body">
                        <div id="countPas" style="height: 500px; width: 1200px"></div>
                    </div>
                </div>
            </div>

            <div class="wrapper-md tab-pane active" ng-controller="SMSCtrl"
                 has-role="ADMIN" ng-if="stats.sms" echarts>
                <div class="row">
                    <form class="bs-example form-horizontal ng-pristine ng-valid">
                        <div class="form-group col-md-3"
                             ng-controller="DatepickerDemoCtrl">
                            <div class="col-md-11">
                                <div class="input-group">
                                    <input type="text" class="form-control"
                                           datepicker-popup="{{selected_format}}" is-open="opened"
                                           ng-model="timeRange.startTime"
                                           ng-init="selected_format=formats[5]"
                                           datepicker-options="dateOptions" close-text="Close"
                                           placeholder="起始时间" readOnly/> <span class="input-group-btn">
										<button type="button" class="btn btn-default"
                                                ng-click="open($event)">
                                            <i class="glyphicon glyphicon-calendar"></i>
                                        </button>
									</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-md-3"
                             ng-controller="DatepickerDemoCtrl">
                            <div class="col-md-11">
                                <div class="input-group">
                                    <input type="text" class="form-control"
                                           datepicker-popup="{{selected_format}}" is-open="opened"
                                           ng-model="timeRange.endTime"
                                           ng-init="selected_format=formats[5]"
                                           datepicker-options="dateOptions" close-text="Close"
                                           placeholder="结束时间" readOnly/> <span class="input-group-btn">
										<button type="button" class="btn btn-default"
                                                ng-click="open($event)">
                                            <i class="glyphicon glyphicon-calendar"></i>
                                        </button>
									</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-md-3">
                            <div class="col-md-11">
                                <button type="button" class="btn btn-info" ng-click="query()">查询</button>
                            </div>
                        </div>
                    </form>
                    <div class="panel-body">
                        <div id="smsCount" style="height: 500px; width: 1200px"></div>
                    </div>
                </div>
            </div>

            <div class="wrapper-md tab-pane active" ng-controller="BookingCtrl"
                 has-role="ADMIN" ng-if="stats.booking" echarts>
                <div class="row">
                    <form class="bs-example form-horizontal ng-pristine ng-valid">
                        <div class="form-group col-md-3"
                             ng-controller="DatepickerDemoCtrl">
                            <div class="col-md-11">
                                <div class="input-group">
                                    <input type="text" class="form-control"
                                           datepicker-popup="{{selected_format}}" is-open="opened"
                                           ng-model="timeRange.startTime"
                                           ng-init="selected_format=formats[5]"
                                           datepicker-options="dateOptions" close-text="Close"
                                           placeholder="起始时间" readOnly/> <span class="input-group-btn">
										<button type="button" class="btn btn-default"
                                                ng-click="open($event)">
                                            <i class="glyphicon glyphicon-calendar"></i>
                                        </button>
									</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-md-3"
                             ng-controller="DatepickerDemoCtrl">
                            <div class="col-md-11">
                                <div class="input-group">
                                    <input type="text" class="form-control"
                                           datepicker-popup="{{selected_format}}" is-open="opened"
                                           ng-model="timeRange.endTime"
                                           ng-init="selected_format=formats[5]"
                                           datepicker-options="dateOptions" close-text="Close"
                                           placeholder="结束时间" readOnly/> <span class="input-group-btn">
										<button type="button" class="btn btn-default"
                                                ng-click="open($event)">
                                            <i class="glyphicon glyphicon-calendar"></i>
                                        </button>
									</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-md-3">
                            <div class="col-md-11">
                                <div class="input-group">
                                    <ui-select ng-model="starList.selected" theme="bootstrap">
                                        <ui-select-match placeholder="始发客运站">{{$select.selected.name}}</ui-select-match>
                                        <ui-select-choices
                                                repeat="star in starList | propsFilter: {name: $select.search}">
                                            <span ng-bind-html=" star.name| highlight: $select.search"></span>
                                        </ui-select-choices> </ui-select>
						<span class="input-group-btn">
							<button ng-click="starList.selected = undefined"
                                    class="btn btn-default">
                                <span class="glyphicon glyphicon-trash"></span>
                            </button>
						</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-md-3">
                            <div class="col-md-11">
                                <button type="button" class="btn btn-info" ng-click="query()">查询</button>
                            </div>
                        </div>
                    </form>
                    <div class="panel-body">
                        <div id="bookingCount" style="height: 500px; width: 1200px"></div>
                    </div>
                </div>
            </div>

            <div class="wrapper-md tab-pane active" ng-controller="BusCtrl"
                 has-role="ADMIN" ng-if="stats.bus" echarts>
                <div class="row">
                    <form class="bs-example form-horizontal ng-pristine ng-valid">
                        <div class="form-group col-md-3"
                             ng-controller="DatepickerDemoCtrl">
                            <div class="col-md-11">
                                <div class="input-group">
                                    <input type="text" class="form-control"
                                           datepicker-popup="{{selected_format}}" is-open="opened"
                                           ng-model="timeRange.startTime"
                                           ng-init="selected_format=formats[5]"
                                           datepicker-options="dateOptions" close-text="Close"
                                           placeholder="起始时间" readOnly/> <span class="input-group-btn">
										<button type="button" class="btn btn-default"
                                                ng-click="open($event)">
                                            <i class="glyphicon glyphicon-calendar"></i>
                                        </button>
									</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-md-3"
                             ng-controller="DatepickerDemoCtrl">
                            <div class="col-md-11">
                                <div class="input-group">
                                    <input type="text" class="form-control"
                                           datepicker-popup="{{selected_format}}" is-open="opened"
                                           ng-model="timeRange.endTime"
                                           ng-init="selected_format=formats[5]"
                                           datepicker-options="dateOptions" close-text="Close"
                                           placeholder="结束时间" readOnly/> <span class="input-group-btn">
										<button type="button" class="btn btn-default"
                                                ng-click="open($event)">
                                            <i class="glyphicon glyphicon-calendar"></i>
                                        </button>
									</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-md-3">
                            <div class="col-md-11">
                                <div class="input-group">
                                    <ui-select ng-model="orgList.selected" theme="bootstrap">
                                        <ui-select-match placeholder="运营单位">{{$select.selected.name}}</ui-select-match>
                                        <ui-select-choices
                                                repeat="org in orgList | propsFilter: {name: $select.search}">
                                            <span ng-bind-html=" org.name| highlight: $select.search"></span>
                                        </ui-select-choices> </ui-select>
						<span class="input-group-btn">
							<button ng-click="orgList.selected = undefined"
                                    class="btn btn-default">
                                <span class="glyphicon glyphicon-trash"></span>
                            </button>
						</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group col-md-3">
                            <div class="col-md-3">
                                <button type="button" class="btn btn-info" ng-click="query()">查询</button>
                            </div>
                        </div>
                    </form>
                    <div class="panel-body">
                        <div id="busCount" style="height: 500px; width: 1200px"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>